package com.util
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	
	import xm.core.XMSprite;
	
	/**
	 * <br> 클래스 설명 : </br>
	 * @author 강석민
	 */	
	public class AlignUtil
	{
		//-----------------------------------------------------------------------------------
		// public vars
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// protected / internal vars
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// private vars
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// public functions
		//-----------------------------------------------------------------------------------
		
		/**
		 *					숫자패드 1번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign1( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = 0;
			target.y = height - target.height;
		}
		
		/**
		 *					숫자패드 2번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign2( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = ( width 	- target.width 	)/2;
			target.y = height - target.height;
		}
		
		/**
		 *					숫자패드 3번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign3( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = width  - target.width;
			target.y = height - target.height;
		}
		
		/**
		 *					숫자패드 4번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign4( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = 0;
			target.y = ( height - target.height )/2;
		}
		
		/**
		 *					숫자패드 5번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign5( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = ( width 	- target.width 	)/2;
			target.y = ( height - target.height )/2;
		}
		
		/**
		 *					숫자패드 6번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign6( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = width  	- target.width;
			target.y = ( height - target.height )/2;
		}
		/**
		 *					숫자패드 7번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign7( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = 0;
			target.y = 0;
		}
		/**
		 *					숫자패드 8번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign8( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = ( width 	- target.width 	)/2;
			target.y = 0;
		}
		/**
		 *					숫자패드 9번자리 정렬 
		 * @param target
		 * @param width
		 * @param height
		 * 
		 */		
		static public function simpleAlign9( target : DisplayObject, width : Number, height : Number ):void
		{
			target.x = width  - target.width;
			target.y = 0;
		}
		
		/**
		 * constructor 
		 */	
		public function AlignUtil()
		{
		}
		//-----------------------------------------------------------------------------------
		// setter / getter
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// protected functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// internal functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// private functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// event handler
		//-----------------------------------------------------------------------------------
		
		
		
	}
}